<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateElRefundTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('el_refund', function (Blueprint $table) {
            $table->increments('id');
            $table->string('refund_no'); //退款编号
            $table->integer('user_id')->unsigned(); //申请人
            $table->integer('admin_id')->unsigned()->nullable(); // 处理人
            $table->integer('order_id'); //订单ID
            $table->integer('order_item_id'); //订单中具体的商品
            $table->integer('type'); //1：退货， 2：换货，3：维修
            $table->integer('quantity'); //数量
            $table->text('content');//问题描述
            $table->integer('status');//1. 处理中  2.已完成  3.退款中 4上门取件 5 待您邮寄  6待您评价
            $table->text('images')->nullable();
            $table->timestamps();
            $table->softDeletes();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('el_refund');
    }
}
